package web;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.ProdDao;
import entity.Prod;

public class SearchServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;

	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		ProdDao ud=new ProdDao();
		List<Prod> prodList=ud.findAllProd();
		request.setAttribute("prodList",prodList);
		request.getRequestDispatcher("main.jsp").forward(request,response);
	}
	
	
	

}
